package cn.wolfcode.trip.base.mapper;

import cn.wolfcode.trip.base.domain.OrderForm;
import cn.wolfcode.trip.base.query.QueryObject;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface OrderFormMapper {
    int deleteByPrimaryKey(Long id);

    int insert(OrderForm entity);

   List<OrderForm> selectByPrimaryKey(Long id);

    List<OrderForm> selectAll();

    int updateByPrimaryKey(OrderForm entity);

    List<OrderForm> selectForList(QueryObject qo);
    //修改订单状态
    void updateStatus(@Param("id") Long id,
                      @Param("state") Integer state);

    //保存用户和订单的中间表
    void insertUserAndOrderForm(@Param("userId") Long userId, @Param("formId") Long id);
}